package fruit;

public class Fruit {
    Double price = 0D;
    Double weight = 0D;
    Double discount = 0D;

    /**
     * @param priceNow 当期价格
     * @param weightBuy 购买的重量
     * @param discountNow 实时折扣
     */
    Fruit(Double priceNow,Double weightBuy, Double discountNow){
        price=priceNow;
        weight=weightBuy;
        discount=discountNow;
    }
    Double getPrice(){
        return weight*price*discount;
    };
}
